'use strict';

module.exports = {
  up: async (queryInterface, Sequelize) => {
    /**
     * Add altering commands here.
     *
     * Example:
     * await queryInterface.createTable('users', { id: Sequelize.INTEGER });
     */
    return await queryInterface.createTable('admin_user', {
      id: { type: Sequelize.INTEGER, primaryKey: true, autoIncrement: true },
      session_id: Sequelize.STRING(50),
      account: Sequelize.STRING(20),
      password: Sequelize.STRING(50),
      username: Sequelize.STRING(20),
      wechat: Sequelize.STRING(30),
      qq: Sequelize.STRING(20),
      github: Sequelize.STRING(20),
      keywords: Sequelize.TEXT,
      description: Sequelize.TEXT,
      sendword: Sequelize.TEXT,
      create_time: Sequelize.DATE
    });
  },

  down: async (queryInterface, Sequelize) => {
    /**
     * Add reverting commands here.
     *
     * Example:
     * await queryInterface.dropTable('users');
     */
    return await queryInterface.dropTable('admin_user');
  }
};
